﻿using System;
using EPiServer.Shell.ObjectEditing.EditorDescriptors;
using OpenWaves.Web;

namespace OpenWaves.EPiServer.GeoProperties
{
    public static class EditorDescriptorExtensions
    {
        public static string GetEmbeddedResourceUrl(this EditorDescriptor editorDescriptor, Type type)
        {
            AssemblyResourceVirtualPathProvider.EnsureRegistered();
            return AssemblyResourceVirtualPathProvider.CreateUrl(type).ToString().Replace("~", String.Empty);
        }        
    }
}